<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.zjf.entity.Article"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.net.URLDecoder"%>
<%@page import="com.zjf.dao.ArticleDao"%>
<%@page import="com.zjf.dao.impl.ArticleDaoImpl"%>
<%!
	public boolean lostDatas(List<Article> datas){
		for(Article a:datas){
			if(a==null){
				return true;
			}
		}
		return false;
	}
 %>
<%


if(application.getAttribute("articles")==null){
			
}else{
	ArrayList<Article> datas = (ArrayList<Article>)application.getAttribute("articles");
	if(lostDatas(datas)){
		ArticleDao dao = new ArticleDaoImpl();
		datas = dao.queryArticles();
		application.setAttribute("articles",datas);
	}
}



%>

